﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CaramelEngine.Dice
{
    //public class RestrictedDice : IDice, IModifiableDice
    //{

    //}

    /*
    public class RestrictedD4Dice : IDice, IModifiableDice
    {
       
    }
    */
    /*
    public class RestrictedDice : IDice
    {
        private int d4;
        private int d6;
        private int d8;
        private int d10;
        private int d12;
        private int d20;

        public int MinD4 { get; set; }
        public int MinD6 { get; set; }
        public int MinD8 { get; set; }
        public int MinD10 { get; set; }
        public int MinD12 { get; set; }
        public int MinD20 { get; set; }

        public int MaxD4 { get; set; }
        public int MaxD6 { get; set; }
        public int MaxD8 { get; set; }
        public int MaxD10 { get; set; }
        public int MaxD12 { get; set; }
        public int MaxD20 { get; set; }

        public RestrictedDice()
        {
            d4 = d6 = d8 = d10 = d12 = d20 = 0;

            MinD4 = MinD6 = MinD8 = MinD10 = MinD12 = MinD20 = 0;

            MaxD4 = MaxD6 = MaxD8 = MaxD10 = MaxD12 = MaxD20 = -1;
        }
        public RestrictedDice(int _mind4, int _mind6, int _mind8, int _mind10, int _mind12, int _mind20, int _maxd4, int _maxd6, int _maxd8, int _maxd10, int _maxd12, int _maxd20)
            : this()
        {
            MinD4 = _mind4;
            MinD6 = _mind6;
            MinD8 = _mind8;
            MinD10 = _mind10;
            MinD12 = _mind12;
            MinD20 = _mind20;
            MaxD4 = _maxd4;
            MaxD6 = _maxd6;
            MaxD8 = -_maxd8;
            MaxD10 = _maxd10;
            MaxD12 = _maxd12;
            MaxD20 = _maxd20;
        }


        #region IDice Members

        public int diceCount
        {
            get { return (d4Count + d6Count + d8Count + d10Count + d12Count + d20Count); }
        }

        public int d4Count
        {
            get { return d4; }
            set
            {
                if (MaxD4 != -1)
                    if (value <= MaxD4 && value >= MinD4)
                        d4 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD4 + " - " + MaxD4);
                else
                    if (value >= MinD4)
                        d4 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD4 + " - " + MaxD4);
            }
        }

        public int d6Count
        {
            get { return d6; }
            set
            {
                if (MaxD6 != -1)
                    if (value <= MaxD6 && value >= MinD6)
                        d6 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD6 + " - " + MaxD6);
                else
                    if (value >= MinD6)
                        d6 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD6 + " - " + MaxD6);
            }
        }

        public int d8Count
        {
            get { return d8; }
            set
            {
                if (MaxD8 != -1)
                    if (value <= MaxD8 && value >= MinD8)
                        d8 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD8 + " - " + MaxD8);
                else
                    if (value >= MinD8)
                        d8 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD8 + " - " + MaxD8);
            }
        }

        public int d10Count
        {
            get { return d10; }
            set
            {
                if (MaxD10 != -1)
                    if (value <= MaxD10 && value >= MinD10)
                        d10 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD10 + " - " + MaxD10);
                else
                    if (value >= MinD10)
                        d10 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD10 + " - " + MaxD10);
            }
        }

        public int d12Count
        {
            get { return d12; }
            set
            {
                if (MaxD12 != -1)
                    if (value <= MaxD12 && value >= MinD12)
                        d12 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD12 + " - " + MaxD12);
                else
                    if (value >= MinD12)
                        d12 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD12 + " - " + MaxD12);
            }
        }

        public int d20Count
        {
            get { return d20; }
            set
            {
                if (MaxD20 != -1)
                    if (value <= MaxD20 && value >= MinD20)
                        d20 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD20 + " - " + MaxD20);
                else
                    if (value >= MinD20)
                        d20 = value;
                    else
                        throw new InvalidOperationException("The value is restricted to " + MinD20 + " - " + MaxD20);
            }
        }

        #endregion
    }
    */
}
